package user;

import book.BookList;
import operate.Ioperate;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-03-23
 * Time: 22:03
 */
public abstract class User {
    private String name;
    private Ioperate[] ioperates;


    public User(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Ioperate[] getIoperates() {
        return ioperates;
    }

    public void setIoperates(Ioperate[] ioperates) {
        this.ioperates = ioperates;
    }

    public void doOperate(int choice, BookList bookList){
        this.ioperates[choice].work(bookList);
    }

    public abstract int menu();
}
